#pragma once
#include "ModelEntity.h"

class ZhicheEntity : public ModelEntity {
public:
	ZhicheEntity();

	~ZhicheEntity() {}

	void update() override;

	void handleDoor(HDir side, Switch status);

	void resetDoor() {
		handleDoor(HDir::Left, Switch::Off);
		handleDoor(HDir::Right, Switch::Off);
	}

private:
	void loadAsyncDoors();

	CVector<Entity*> m_doorLeftModels, m_doorRightModels;
	P3D m_doorLeftMinZPoint, m_doorRightMinZPoint;
	CMap<HDir, Switch> m_doorStatusMap;
	bool m_isDoorsLoadedDone = false;
};
